package com.stopboot.code.generator.modle;

import lombok.Data;

import java.io.Serializable;

/**
 * @author lyt
 * @version 1.0.0
 * @ClassName DbInfoBo.java
 * @Description
 * @createTime 2022年04月22日 23:28:00
 */
@Data
public class DbLinkInfo implements Serializable {

    private static final long serialVersionUID = -86901695844654444L;


    public DbLinkInfo(String dbType, String serverName, String databaseName, Integer portNumber, String user, String password) {
        this.dbType = dbType;
        this.serverName = serverName;
        this.databaseName = databaseName;
        this.portNumber = portNumber;
        this.user = user;
        this.password = password;
    }

    /**
     * 数据库类型
     */
    private String dbType;

    /**
     * oracle 数据源信息
     */
    private OracleLinkInfo oracleLinkInfo;


    /**
     * database server name or ip or url (e.g localhost || 172.17.6.19)
     */
    private String serverName;
    /**
     * Oracle SID 或 mysql database name
     */
    private String databaseName;
    /**
     * listener port number
     */
    private Integer portNumber;
    /**
     * username
     */
    private String user;
    /**
     * password
     */
    private String password;


    @Data
    public class OracleLinkInfo {
        /**
         * type of driver
         */
        private String driverType;
        /**
         * tcp is the default anyway
         */
        private String networkProtocol;

    }

}
